<?php
class ShopBaseController extends CController
{
	public $layout='/layouts/main';
	public function init()
	{


		if( !isset(Yii::app()->user->type) 
			|| Yii::app()->user->type != User::TYPE_SHOP_ADMIN
			&& Yii::app()->user->type != User::TYPE_SHOP_MANAGER)
		{
			$this->redirect(Yii::app()->homeUrl, true);
		}
	}
}